home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
AMIGA
/
AMICUS
/
AMICUS15.ADF
/
Progs
/
Ask.DOC
< prev
next >
Wrap
Text File
|
1988-04-20
|
2KB
|
50 lines
AUGment - Amiga Users Group
P.O. Box 1863
Fremont, CA 94538-0186
(415) 651-1160 voice
(415) 659-9169 BBS
ASK: A utility to prompt a user for a yes/no answer, and returns a level 5
error code if a negative response is entered. Use in batch files to give
diversity in the execution of your commands. Example:
echo "My WorkBench Disk"
date ? to bootdate
failat 6
ask Do you wish to load Workbench?
if warn
echo Very well, have a nice day!
else
loadwb
ask Do you want to retain this cli?
if warn
endcli > nil:
endif
endif
With the foregoing startup-sequence, you can decide at boot whether
or not you want WorkBench or CLI or both.
This program is written in whitebook C on the fly. I don't have time
to really do much public domain programming, so what I do is usually thrown
together. This DOC file should be bundled with the program and it's source
(ask & ask.c). It was compiled with Aztec C (Manx), and is strickly K&R C
as it is a CLI utility.
You are more than welcome to send me comments, or make adjustments to
the program. Please give this the widest possible distribution, and
include all three files (Program, Doc and Source).
What I hope to do in the future is give a four branch possibility,
but the "if <warn | error | fail>" option works on the last command
envoked, so since the command "else" returns a success code, I am stopped
in my tracks.
Inspired by the IBM ask, and requested by my co-hort and brother-in-law,
John Sanders, I give this package to you. In the IBM, the program returns
an ERRORLEVEL, which is kept resident to the batch file, thus branches can
be made on a variety of errorlevels with nested conditionals. Too bad I
can't do it on the Amiga, unless some of you folks have any suggestions?
Thanks... BCnU...Jim